﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DI.Web.Ninject.Models
{
	public class ShoppingCart
	{
		private IValueCalculator _calculator;
		public ShoppingCart(IValueCalculator calculator)
		{
			_calculator = calculator;
		}
		public IEnumerable<Product> products { get; set; }
		public decimal CalculateProductTotal()
		{
			return _calculator.ValueProducts(products);
		}
	}
}